<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>其它帐号管理</title>
<link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
<script type="text/javascript" src="../js/bootstrap.js"></script>
<script type="text/javascript">
	Ext.onReady(function(){
		var itemsPerpage = 2;	//指定分页大小
		
		//创建数据源
		var store = Ext.create('Ext.data.Store',{
			autoLoad:{start:0,limit:itemsPerpage},
			fields:['id','name','age'],
			pageSize:itemsPerpage,	//设置分页大小
			proxy:{
				type:'ajax',
				url:'otherAccount.txt',	//请求的服务器地址
				reader:{
					type:'json',
					root:'rows',
					totalProperty:'results'
				}
			}
			
		});
		
		//创建grid表格组件
		Ext.create('Ext.grid.Panel',{
			title:'Ext.toolbar.Paging示例',
			renderTo:Ext.getBody(),
			width:500,
			height:400,
			frame:true,
			store:store,
			columns:[
			         {header:'id',dataIndex:'id',sortable:true},
			         {header:'姓名',dataIndex:'name',sortable:true},
			         {header:'年龄',dataIndex:'age',sortable:true}
			],
			bbar:[{xtype:'pagingtoolbar',store:store,displayInfo:true}]
		});
	});
</script>
</head>
<body>
<div id="grid"></div>
</body>
</html>